package com.djf.Scrm.dataRelay.enums;

/**
 * 通用响应状态
 */
public enum ErrorCode {
    ERROR_CODE_0(0,"默认"),
    ERROR_CODE_1(1,"上下文丢失"),
    ERROR_CODE_2(2,"没有权限"),
    ERROR_CODE_3(3,"操作标识为空"),
    ERROR_CODE_4(4,"异常"),
    ERROR_CODE_5(5,"单据标识为空"),
    ERROR_CODE_6(6,"数据库操作失败"),
    ERROR_CODE_7(7,"许可错误"),
    ERROR_CODE_8(8,"参数错误"),
    ERROR_CODE_9(9,"指定字段/值不存"),
    ERROR_CODE_10(10,"未找到对应数据"),
    ERROR_CODE_11(11,"验证失败"),
    ERROR_CODE_12(12,"不可操作"),
    ERROR_CODE_13(13,"网控冲突"),
    ERROR_CODE_14(14,"调用限制"),
    ERROR_CODE_15(15,"禁止管理员登录")
    ;

    //操作代码
    int code;
    //提示信息
    String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int code() {
        return code;
    }

    public String message() {
        return message;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
